<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>SystemSharp: XILSRewriter.cs Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">SystemSharp
   &#160;<span id="projectnumber">0.3</span>
   </div>
   <div id="projectbrief">A system-level modeling framework for designing real-time embedded systems</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_x_i_l_s_rewriter_8cs_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Properties</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Events</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">XILSRewriter.cs</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_x_i_l_s_rewriter_8cs.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="keyword">using</span> System;</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">using</span> System.Collections.Generic;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">using</span> System.Linq;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="keyword">using</span> System.Text;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="keyword">using</span> SystemSharp.Meta;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="keyword">namespace </span>SystemSharp.Assembler.Rewriters</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;{</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html">   33</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html">XILSRewriter</a></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    {</div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a7353cbd61183d0efa4a47907c567e209">   38</a></span>&#160;        <span class="keyword">public</span> IList&lt;XILSInstr&gt; InInstructions { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a4cbddcc246885550283185b47c25d7ee">   43</a></span>&#160;        <span class="keyword">public</span> List&lt;XILSInstr&gt; OutInstructions { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <span class="keyword">private</span> Dictionary&lt;int, int&gt; _remap;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="keyword">private</span> List&lt;Tuple&lt;BranchLabel, BranchLabel&gt;&gt; _remapLabels;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        <span class="keyword">private</span> Dictionary&lt;string, Action&lt;XILSInstr&gt;&gt; _handlers;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        <span class="keyword">private</span> Stack&lt;TypeDescriptor&gt; _typeStack;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        <span class="keyword">private</span> List&lt;XILSInstr&gt; _curBB;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#ae9e62752ea0a2c0661a30ef071ce89b2">   55</a></span>&#160;        <span class="keyword">public</span> <a class="code" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#ae9e62752ea0a2c0661a30ef071ce89b2">XILSRewriter</a>(IList&lt;XILSInstr&gt; instructions)</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        {</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;            InInstructions = instructions;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;            OutInstructions = <span class="keyword">new</span> List&lt;XILSInstr&gt;();</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;            _remap = <span class="keyword">new</span> Dictionary&lt;int, int&gt;();</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;            _remapLabels = <span class="keyword">new</span> List&lt;Tuple&lt;BranchLabel, BranchLabel&gt;&gt;();</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;            _handlers = <span class="keyword">new</span> Dictionary&lt;string, Action&lt;XILSInstr&gt;&gt;();</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;            _typeStack = <span class="keyword">new</span> Stack&lt;TypeDescriptor&gt;();</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;            _curBB = <span class="keyword">new</span> List&lt;XILSInstr&gt;();</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;            RegisterDefaultHandlers();</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        }</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        <span class="keyword">protected</span> <span class="keywordtype">int</span> NextOutputInstructionIndex</div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#af4fdc3dba56f311e3e4090c33683e458">   71</a></span>&#160;        {</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;            <span class="keyword">get</span> { <span class="keywordflow">return</span> OutInstructions.Count; }</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        }</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keyword">protected</span> <span class="keywordtype">int</span> LastOutputInstructionIndex</div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#af4c7f509c508ade699939097cbadadc2">   79</a></span>&#160;        {</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            <span class="keyword">get</span> { <span class="keywordflow">return</span> NextOutputInstructionIndex - 1; }</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        }</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="keyword">protected</span> Stack&lt;TypeDescriptor&gt; TypeStack</div>
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a8df2e50a01f14b39f034908cd983a17c">   87</a></span>&#160;        {</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;            <span class="keyword">get</span> { <span class="keywordflow">return</span> _typeStack; }</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        }</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#abc772a6db979f7932615430e28b67371">   95</a></span>&#160;        <span class="keyword">protected</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#abc772a6db979f7932615430e28b67371">Emit</a>(<a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html">XILSInstr</a> xilsi)</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        {</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;            xilsi.Index = NextOutputInstructionIndex;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;            <span class="keywordflow">if</span> (CurInstr != null)</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;                xilsi.CILRef = CurInstr.CILRef;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;            <span class="keywordtype">int</span> numOperands = xilsi.OperandTypes.Length;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = numOperands - 1; i &gt;= 0; i--)</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;            {</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;                <a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html">TypeDescriptor</a> t = _typeStack.Pop();</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;                <span class="keywordflow">if</span> (!t.<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a9099b9111f475996cba618ae9faaa4ff">Equals</a>(xilsi.<a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html#a150187afdc70d69313ed664984ca65aa">OperandTypes</a>[i]))</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;                    <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentException(<span class="stringliteral">&quot;Incompatible operand types&quot;</span>);</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;            }</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;            <span class="keywordflow">foreach</span> (<a class="code" href="class_system_sharp_1_1_meta_1_1_type_descriptor.html">TypeDescriptor</a> result <span class="keywordflow">in</span> xilsi.ResultTypes)</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;            {</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;                _typeStack.Push(result);</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;            }</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;            OutInstructions.Add(xilsi);</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;            <span class="keywordflow">if</span> (xilsi.Name == <a class="code" href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html">InstructionCodes</a>.<a class="code" href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html#ab03034e91bd02ba372bde869feafea1b">BranchIfFalse</a> ||</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;                xilsi.Name == <a class="code" href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html">InstructionCodes</a>.<a class="code" href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html#ab23029ba0aac899075f7fb0c79daaf3d">BranchIfTrue</a> ||</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;                xilsi.Name == <a class="code" href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html">InstructionCodes</a>.<a class="code" href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html#aa5ff90a79e93b805f3f0935a366dd2cc">Goto</a>)</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;            {</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;                _curBB.Clear();</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;            }</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;            {</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;                _curBB.Add(xilsi);</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;            }</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        }</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a39110767e3899b31c7836750ca9e9670">  129</a></span>&#160;        <span class="keyword">protected</span> <a class="code" href="class_system_sharp_1_1_assembler_1_1_branch_label.html">BranchLabel</a> <a class="code" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a39110767e3899b31c7836750ca9e9670">Retarget</a>(<a class="code" href="class_system_sharp_1_1_assembler_1_1_branch_label.html">BranchLabel</a> label)</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        {</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;            <a class="code" href="class_system_sharp_1_1_assembler_1_1_branch_label.html">BranchLabel</a> newLabel = <span class="keyword">new</span> <a class="code" href="class_system_sharp_1_1_assembler_1_1_branch_label.html">BranchLabel</a>();</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;            _remapLabels.Add(<span class="keyword">new</span> Tuple&lt;BranchLabel, BranchLabel&gt;(label, newLabel));</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            <span class="keywordflow">return</span> newLabel;</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        }</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a78fc5acd40fd11744cdf6101fe074a0e">  141</a></span>&#160;        <span class="keyword">protected</span> <span class="keywordtype">void</span> <a class="code" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a78fc5acd40fd11744cdf6101fe074a0e">SetHandler</a>(<span class="keywordtype">string</span> icode, Action&lt;XILSInstr&gt; handler)</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        {</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;            _handlers[icode] = handler;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        }</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div>
<div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#aa44418c55166ae8d4c1e0d9aa47680ca">  151</a></span>&#160;        <span class="keyword">protected</span> <a class="code" href="class_system_sharp_1_1_assembler_1_1_instruction_dependency.html">InstructionDependency</a>[] <a class="code" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#aa44418c55166ae8d4c1e0d9aa47680ca">RemapPreds</a>(<a class="code" href="class_system_sharp_1_1_assembler_1_1_instruction_dependency.html">InstructionDependency</a>[] preds)</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        {</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;            var result = <span class="keyword">new</span> List&lt;InstructionDependency&gt;();</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;            <span class="keywordflow">foreach</span> (var pred <span class="keywordflow">in</span> preds)</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;            {</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;                <span class="keywordtype">int</span> next, cur;</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;                <span class="keywordflow">if</span> (!_remap.TryGetValue(pred.PredIndex, out cur))</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;                    <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;                <span class="keywordflow">if</span> (!_remap.TryGetValue(pred.PredIndex + 1, out next))</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;                    next = cur + 1;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;                <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = cur; i &lt; next; i++)</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;                    result.Add(pred.Remap(i));</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;            }</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;            <span class="keywordflow">return</span> result.ToArray();</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;        }</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div>
<div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a0c0f973f709384755c4f07b1de551027">  171</a></span>&#160;        <span class="keyword">virtual</span> <span class="keyword">protected</span> <span class="keywordtype">void</span> <a class="code" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a0c0f973f709384755c4f07b1de551027">ProcessDefault</a>(<a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html">XILSInstr</a> i)</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;        {</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;            var preds = RemapPreds(i.<a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html#a36a6a6eb2be85971eb26d5eb65002c22">Preds</a>);</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;            Emit(i.<a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html#a4a8684d0a4696fdbbd92d283468f7348">Command</a>.<a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_instr.html#a182cd82b0a2a5e31069716ca7f1b8049">CreateStk</a>(preds, i.<a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html#a150187afdc70d69313ed664984ca65aa">OperandTypes</a>, i.<a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html#a79bc10b4989b44fcefc2f9644fbe0b07">ResultTypes</a>));</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        }</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;</div>
<div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a0a13edcf1fb9bf4d19245a5bea228716">  181</a></span>&#160;        <span class="keyword">virtual</span> <span class="keyword">protected</span> <span class="keywordtype">void</span> <a class="code" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a0a13edcf1fb9bf4d19245a5bea228716">ProcessBranch</a>(<a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html">XILSInstr</a> i)</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        {</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;            <a class="code" href="class_system_sharp_1_1_assembler_1_1_branch_label.html">BranchLabel</a> label = (<a class="code" href="class_system_sharp_1_1_assembler_1_1_branch_label.html">BranchLabel</a>)i.<a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html#a6dc4c54bbf5827e0d316ebcf05c776c5">StaticOperand</a>;</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;            <a class="code" href="class_system_sharp_1_1_assembler_1_1_branch_label.html">BranchLabel</a> newLabel = Retarget(label);</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;            <a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_instr.html">XILInstr</a> xi = <span class="keyword">new</span> <a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_instr.html">XILInstr</a>(i.<a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html#a5e32a0157baf6e849171757be4a72581">Name</a>, newLabel);</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;            var preds = RemapPreds(i.<a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html#a36a6a6eb2be85971eb26d5eb65002c22">Preds</a>);</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;            Emit(xi.<a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_instr.html#a182cd82b0a2a5e31069716ca7f1b8049">CreateStk</a>(preds, i.<a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html#a150187afdc70d69313ed664984ca65aa">OperandTypes</a>, i.<a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html#a79bc10b4989b44fcefc2f9644fbe0b07">ResultTypes</a>));</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        }</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div>
<div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a5f7621436a0a076f7d2fe53d07035f50">  195</a></span>&#160;        <span class="keyword">virtual</span> <span class="keyword">protected</span> <span class="keywordtype">void</span> <a class="code" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a5f7621436a0a076f7d2fe53d07035f50">ProcessInstruction</a>(<a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html">XILSInstr</a> i)</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        {</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;            Action&lt;XILSInstr&gt; handler = _handlers[i.Name];</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;            handler(i);</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        }</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        <span class="keyword">private</span> <span class="keywordtype">void</span> RegisterDefaultHandlers()</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        {</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;            <span class="keywordflow">foreach</span> (<span class="keywordtype">string</span> icode <span class="keywordflow">in</span> <a class="code" href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html">InstructionCodes</a>.<a class="code" href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html#ae38768cce29779eb1770fd7706667255">AllCodes</a>)</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;            {</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;                SetHandler(icode, ProcessDefault);</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;            }</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;            SetHandler(<a class="code" href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html">InstructionCodes</a>.<a class="code" href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html#ab03034e91bd02ba372bde869feafea1b">BranchIfFalse</a>, ProcessBranch);</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;            SetHandler(<a class="code" href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html">InstructionCodes</a>.<a class="code" href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html#ab23029ba0aac899075f7fb0c79daaf3d">BranchIfTrue</a>, ProcessBranch);</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;            SetHandler(<a class="code" href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html">InstructionCodes</a>.<a class="code" href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html#aa5ff90a79e93b805f3f0935a366dd2cc">Goto</a>, ProcessBranch);</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;        }</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;</div>
<div class="line"><a name="l00215"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#aad291b1e61e00554bbec6a0414b1c56a">  215</a></span>&#160;        <span class="keyword">protected</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#aad291b1e61e00554bbec6a0414b1c56a">PreProcess</a>()</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;        {</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        }</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;</div>
<div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#aa58d6b86d072c2e3e1668eb3839e7126">  223</a></span>&#160;        <span class="keyword">protected</span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#aa58d6b86d072c2e3e1668eb3839e7126">PostProcess</a>()</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;        {</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;            <span class="keywordflow">foreach</span> (Tuple&lt;BranchLabel, BranchLabel&gt; pair <span class="keywordflow">in</span> _remapLabels)</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;            {</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;                pair.Item2.InstructionIndex = _remap[pair.Item1.InstructionIndex];</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;            }</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;        }</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;</div>
<div class="line"><a name="l00234"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#abf9a8e85726fb361015315e1d6ab1f3e">  234</a></span>&#160;        <span class="keyword">protected</span> <a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html">XILSInstr</a> CurInstr { <span class="keyword">get</span>; <span class="keyword">private</span> set; }</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        <span class="keyword">protected</span> IEnumerable&lt;XILSInstr&gt; CurBB</div>
<div class="line"><a name="l00240"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#aa8089514ce82a1562c7f0eb6a8727795">  240</a></span>&#160;        {</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;            <span class="keyword">get</span> { <span class="keywordflow">return</span> _curBB; }</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;        }</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;</div>
<div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a42f927b04d439342884bff151e5f7dea">  244</a></span>&#160;        <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a42f927b04d439342884bff151e5f7dea">Rewrite</a>()</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;        {</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;            PreProcess();</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;            _remap[-1] = -1;</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;            <span class="keywordflow">foreach</span> (<a class="code" href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html">XILSInstr</a> i <span class="keywordflow">in</span> InInstructions)</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;            {</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;                _remap[i.Index] = NextOutputInstructionIndex;</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;                CurInstr = i;</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;                ProcessInstruction(i);</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;            }</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;            PostProcess();</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;        }</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;    }</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;}</div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter_html_a5f7621436a0a076f7d2fe53d07035f50"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a5f7621436a0a076f7d2fe53d07035f50">SystemSharp.Assembler.Rewriters.XILSRewriter.ProcessInstruction</a></div><div class="ttdeci">virtual void ProcessInstruction(XILSInstr i)</div><div class="ttdoc">This method is called for any instruction. Its default behavior is to lookup handler inside the handl...</div><div class="ttdef"><b>Definition:</b> <a href="_x_i_l_s_rewriter_8cs_source.html#l00195">XILSRewriter.cs:195</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr_html_a79bc10b4989b44fcefc2f9644fbe0b07"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html#a79bc10b4989b44fcefc2f9644fbe0b07">SystemSharp.Assembler.XILSInstr.ResultTypes</a></div><div class="ttdeci">TypeDescriptor[] ResultTypes</div><div class="ttdoc">Result types to be pushed on the stack, from bottom (index 0) to top </div><div class="ttdef"><b>Definition:</b> <a href="_asm_core_8cs_source.html#l00469">AsmCore.cs:469</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_instruction_codes_html_ab03034e91bd02ba372bde869feafea1b"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html#ab03034e91bd02ba372bde869feafea1b">SystemSharp.Assembler.InstructionCodes.BranchIfFalse</a></div><div class="ttdeci">const string BranchIfFalse</div><div class="ttdoc">Branch if operand is &quot;false&quot; </div><div class="ttdef"><b>Definition:</b> <a href="_instruction_set_8cs_source.html#l00061">InstructionSet.cs:61</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter_html_a0c0f973f709384755c4f07b1de551027"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a0c0f973f709384755c4f07b1de551027">SystemSharp.Assembler.Rewriters.XILSRewriter.ProcessDefault</a></div><div class="ttdeci">virtual void ProcessDefault(XILSInstr i)</div><div class="ttdoc">The default handler is applied to any non-branching instruction when there is no more specific handle...</div><div class="ttdef"><b>Definition:</b> <a href="_x_i_l_s_rewriter_8cs_source.html#l00171">XILSRewriter.cs:171</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_x_i_l_instr_html_a182cd82b0a2a5e31069716ca7f1b8049"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_x_i_l_instr.html#a182cd82b0a2a5e31069716ca7f1b8049">SystemSharp.Assembler.XILInstr.CreateStk</a></div><div class="ttdeci">XILSInstr CreateStk(InstructionDependency[] preds, TypeDescriptor[] operandTypes, TypeDescriptor[] resultTypes)</div><div class="ttdoc">Creates a XIL-S representation of this instruction </div><div class="ttdef"><b>Definition:</b> <a href="_asm_core_8cs_source.html#l00122">AsmCore.cs:122</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter_html_abc772a6db979f7932615430e28b67371"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#abc772a6db979f7932615430e28b67371">SystemSharp.Assembler.Rewriters.XILSRewriter.Emit</a></div><div class="ttdeci">virtual void Emit(XILSInstr xilsi)</div><div class="ttdoc">Emits a XIL-S instruction and assigns an index to it. </div><div class="ttdef"><b>Definition:</b> <a href="_x_i_l_s_rewriter_8cs_source.html#l00095">XILSRewriter.cs:95</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_instruction_dependency_html"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_instruction_dependency.html">SystemSharp.Assembler.InstructionDependency</a></div><div class="ttdoc">Abstract base class for control and data dependencies. </div><div class="ttdef"><b>Definition:</b> <a href="_asm_core_8cs_source.html#l00164">AsmCore.cs:164</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr_html_a36a6a6eb2be85971eb26d5eb65002c22"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html#a36a6a6eb2be85971eb26d5eb65002c22">SystemSharp.Assembler.XILSInstr.Preds</a></div><div class="ttdeci">InstructionDependency[] Preds</div><div class="ttdoc">Instruction dependencies </div><div class="ttdef"><b>Definition:</b> <a href="_asm_core_8cs_source.html#l00459">AsmCore.cs:459</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr_html_a6dc4c54bbf5827e0d316ebcf05c776c5"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html#a6dc4c54bbf5827e0d316ebcf05c776c5">SystemSharp.Assembler.XILSInstr.StaticOperand</a></div><div class="ttdeci">object StaticOperand</div><div class="ttdef"><b>Definition:</b> <a href="_asm_core_8cs_source.html#l00477">AsmCore.cs:477</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr_html"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html">SystemSharp.Assembler.XILSInstr</a></div><div class="ttdoc">A XIL-S instruction </div><div class="ttdef"><b>Definition:</b> <a href="_asm_core_8cs_source.html#l00444">AsmCore.cs:444</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr_html_a4a8684d0a4696fdbbd92d283468f7348"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html#a4a8684d0a4696fdbbd92d283468f7348">SystemSharp.Assembler.XILSInstr.Command</a></div><div class="ttdeci">XILInstr Command</div><div class="ttdoc">Underlying XIL instruction </div><div class="ttdef"><b>Definition:</b> <a href="_asm_core_8cs_source.html#l00449">AsmCore.cs:449</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter_html_a39110767e3899b31c7836750ca9e9670"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a39110767e3899b31c7836750ca9e9670">SystemSharp.Assembler.Rewriters.XILSRewriter.Retarget</a></div><div class="ttdeci">BranchLabel Retarget(BranchLabel label)</div><div class="ttdoc">Retargets an input instruction branch label to the output side. </div><div class="ttdef"><b>Definition:</b> <a href="_x_i_l_s_rewriter_8cs_source.html#l00129">XILSRewriter.cs:129</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter_html_ae9e62752ea0a2c0661a30ef071ce89b2"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#ae9e62752ea0a2c0661a30ef071ce89b2">SystemSharp.Assembler.Rewriters.XILSRewriter.XILSRewriter</a></div><div class="ttdeci">XILSRewriter(IList&lt; XILSInstr &gt; instructions)</div><div class="ttdoc">Constructs a new instance </div><div class="ttdef"><b>Definition:</b> <a href="_x_i_l_s_rewriter_8cs_source.html#l00055">XILSRewriter.cs:55</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr_html_a5e32a0157baf6e849171757be4a72581"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html#a5e32a0157baf6e849171757be4a72581">SystemSharp.Assembler.XILSInstr.Name</a></div><div class="ttdeci">string Name</div><div class="ttdef"><b>Definition:</b> <a href="_asm_core_8cs_source.html#l00482">AsmCore.cs:482</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_instruction_codes_html"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html">SystemSharp.Assembler.InstructionCodes</a></div><div class="ttdoc">All XIL opcodes </div><div class="ttdef"><b>Definition:</b> <a href="_instruction_set_8cs_source.html#l00036">InstructionSet.cs:36</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_instruction_codes_html_ae38768cce29779eb1770fd7706667255"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html#ae38768cce29779eb1770fd7706667255">SystemSharp.Assembler.InstructionCodes.AllCodes</a></div><div class="ttdeci">static IEnumerable&lt; string &gt; AllCodes</div><div class="ttdoc">Returns all XIL opcodes </div><div class="ttdef"><b>Definition:</b> <a href="_instruction_set_8cs_source.html#l00380">InstructionSet.cs:380</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter_html_aad291b1e61e00554bbec6a0414b1c56a"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#aad291b1e61e00554bbec6a0414b1c56a">SystemSharp.Assembler.Rewriters.XILSRewriter.PreProcess</a></div><div class="ttdeci">virtual void PreProcess()</div><div class="ttdoc">This method is called before processing all inputs instructions. It does nothing by default...</div><div class="ttdef"><b>Definition:</b> <a href="_x_i_l_s_rewriter_8cs_source.html#l00215">XILSRewriter.cs:215</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter_html_a0a13edcf1fb9bf4d19245a5bea228716"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a0a13edcf1fb9bf4d19245a5bea228716">SystemSharp.Assembler.Rewriters.XILSRewriter.ProcessBranch</a></div><div class="ttdeci">virtual void ProcessBranch(XILSInstr i)</div><div class="ttdoc">The default branch handler is applied to any branching instruction when there is no more specific han...</div><div class="ttdef"><b>Definition:</b> <a href="_x_i_l_s_rewriter_8cs_source.html#l00181">XILSRewriter.cs:181</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_meta_1_1_type_descriptor_html"><div class="ttname"><a href="class_system_sharp_1_1_meta_1_1_type_descriptor.html">SystemSharp.Meta.TypeDescriptor</a></div><div class="ttdoc">Describes a type. </div><div class="ttdef"><b>Definition:</b> <a href="_type_descriptor_8cs_source.html#l00120">TypeDescriptor.cs:120</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_branch_label_html"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_branch_label.html">SystemSharp.Assembler.BranchLabel</a></div><div class="ttdoc">A branch label </div><div class="ttdef"><b>Definition:</b> <a href="_asm_core_8cs_source.html#l00580">AsmCore.cs:580</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_meta_1_1_type_descriptor_html_a9099b9111f475996cba618ae9faaa4ff"><div class="ttname"><a href="class_system_sharp_1_1_meta_1_1_type_descriptor.html#a9099b9111f475996cba618ae9faaa4ff">SystemSharp.Meta.TypeDescriptor.Equals</a></div><div class="ttdeci">override bool Equals(object obj)</div><div class="ttdef"><b>Definition:</b> <a href="_type_descriptor_8cs_source.html#l00631">TypeDescriptor.cs:631</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter_html_a78fc5acd40fd11744cdf6101fe074a0e"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a78fc5acd40fd11744cdf6101fe074a0e">SystemSharp.Assembler.Rewriters.XILSRewriter.SetHandler</a></div><div class="ttdeci">void SetHandler(string icode, Action&lt; XILSInstr &gt; handler)</div><div class="ttdoc">Registers a handler for a specific XIL opcode </div><div class="ttdef"><b>Definition:</b> <a href="_x_i_l_s_rewriter_8cs_source.html#l00141">XILSRewriter.cs:141</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_instruction_codes_html_aa5ff90a79e93b805f3f0935a366dd2cc"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html#aa5ff90a79e93b805f3f0935a366dd2cc">SystemSharp.Assembler.InstructionCodes.Goto</a></div><div class="ttdeci">const string Goto</div><div class="ttdoc">Unconditional branch </div><div class="ttdef"><b>Definition:</b> <a href="_instruction_set_8cs_source.html#l00131">InstructionSet.cs:131</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_instruction_codes_html_ab23029ba0aac899075f7fb0c79daaf3d"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_instruction_codes.html#ab23029ba0aac899075f7fb0c79daaf3d">SystemSharp.Assembler.InstructionCodes.BranchIfTrue</a></div><div class="ttdeci">const string BranchIfTrue</div><div class="ttdoc">Branch if operand is &quot;true&quot; </div><div class="ttdef"><b>Definition:</b> <a href="_instruction_set_8cs_source.html#l00056">InstructionSet.cs:56</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter_html_a42f927b04d439342884bff151e5f7dea"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#a42f927b04d439342884bff151e5f7dea">SystemSharp.Assembler.Rewriters.XILSRewriter.Rewrite</a></div><div class="ttdeci">void Rewrite()</div><div class="ttdef"><b>Definition:</b> <a href="_x_i_l_s_rewriter_8cs_source.html#l00244">XILSRewriter.cs:244</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr_html_a150187afdc70d69313ed664984ca65aa"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_x_i_l_s_instr.html#a150187afdc70d69313ed664984ca65aa">SystemSharp.Assembler.XILSInstr.OperandTypes</a></div><div class="ttdeci">TypeDescriptor[] OperandTypes</div><div class="ttdoc">Types of operands expected on the stack, from bottom (index 0) to top </div><div class="ttdef"><b>Definition:</b> <a href="_asm_core_8cs_source.html#l00464">AsmCore.cs:464</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter_html_aa58d6b86d072c2e3e1668eb3839e7126"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#aa58d6b86d072c2e3e1668eb3839e7126">SystemSharp.Assembler.Rewriters.XILSRewriter.PostProcess</a></div><div class="ttdeci">virtual void PostProcess()</div><div class="ttdoc">This method is called after processing all inputs instructions. Its default behavior is to adjust all...</div><div class="ttdef"><b>Definition:</b> <a href="_x_i_l_s_rewriter_8cs_source.html#l00223">XILSRewriter.cs:223</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter_html"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html">SystemSharp.Assembler.Rewriters.XILSRewriter</a></div><div class="ttdoc">This class provides a default implementation of a XIL-S code transformation. It alleviates the user f...</div><div class="ttdef"><b>Definition:</b> <a href="_x_i_l_s_rewriter_8cs_source.html#l00033">XILSRewriter.cs:33</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter_html_aa44418c55166ae8d4c1e0d9aa47680ca"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_rewriters_1_1_x_i_l_s_rewriter.html#aa44418c55166ae8d4c1e0d9aa47680ca">SystemSharp.Assembler.Rewriters.XILSRewriter.RemapPreds</a></div><div class="ttdeci">InstructionDependency[] RemapPreds(InstructionDependency[] preds)</div><div class="ttdoc">Remaps input instruction dependencies to the output side </div><div class="ttdef"><b>Definition:</b> <a href="_x_i_l_s_rewriter_8cs_source.html#l00151">XILSRewriter.cs:151</a></div></div>
<div class="ttc" id="class_system_sharp_1_1_assembler_1_1_x_i_l_instr_html"><div class="ttname"><a href="class_system_sharp_1_1_assembler_1_1_x_i_l_instr.html">SystemSharp.Assembler.XILInstr</a></div><div class="ttdoc">Models a XIL instruction </div><div class="ttdef"><b>Definition:</b> <a href="_asm_core_8cs_source.html#l00040">AsmCore.cs:40</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_bb5e995590685548b7e11478911ee7c3.html">SystemSharp-Google-SVN</a></li><li class="navelem"><a class="el" href="dir_8deefa4467a62b572b52d238d562b104.html">SystemSharp</a></li><li class="navelem"><a class="el" href="dir_0e5a72156f8560bbc472a395da2569d6.html">SystemSharp</a></li><li class="navelem"><a class="el" href="dir_9d3c30b4336bd92c64ccf0aeee487ace.html">SystemSharp</a></li><li class="navelem"><a class="el" href="dir_a963eca034002571cb311faf6f990d11.html">Assembler</a></li><li class="navelem"><a class="el" href="dir_27619b2baa69d9105896d86f1cd0ff4a.html">Rewriters</a></li><li class="navelem"><a class="el" href="_x_i_l_s_rewriter_8cs.html">XILSRewriter.cs</a></li>
    <li class="footer">Generated on Thu Dec 26 2013 14:21:45 for SystemSharp by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
